<?php
/**
 * @Author: Marte
 * @Date:   2017-08-07 16:07:33
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-17 09:07:33
 */
session_start();
    if(!isset($_SESSION['username']))
    {
        echo "<script>location='dl.php';</script>";
    }
?>


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>消息中心</title>
    <link rel="stylesheet" type="text/css" href="css/messages.css">
    <script src="js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8" ></script>
    <script src="js/person.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="header">
    <div class="header_main">
        <div class="header_main_left">
 <img src="images/personlogo.png" alt="">
        </div>
        <div class="nav">
            <ul>
                <li class="first"><a href="person.php" title="">个人首页</a></li>
                <li><a href="mybookrack.php" title="">朕的书架</a></li>
                <li class="active"><a href="messages.php" title="">消息中心</a></li>
                <li><a href="" title="">书荒区</a></li>
            </ul>
        </div>
        <div class="header_main_right">
            <ul>
                <li><a href="index.php" title="">墨轩首页</a></li>
                <li class="user"><a href="" title=""><?php echo $_SESSION['username'];?></a></li>
                <div class="list"><ul>
                    <li><a href="" title="">充值</a></li>
                    <li><a href="person.php?change=3" title="">个人设置</a></li>
                    <li><a href="" title="">联系客服</a></li>
                    <li><a href="data/user/logout.php?exit=1" title="">退出</a></li>
                </ul></div>
            </ul>

        </div>
    </div>


    <div class="main">
    <div class="main_left">
        <ul>
            <li class="on"><a href="messages.php?action=system" title="">系统消息</a></li>
            <li><a href="messages.php?action=person" title="">私信</a></li>
        </ul>
    </div>

    <div class="main_right">
    <?php
        if(isset($_GET['action']))
        {
                switch($_GET['action'])
            {
                case "system": include 'include/message.system.inc.php';break;
                case "person": include 'include/message.person.inc.php';break;
            }
        }else{
            require 'include/message.system.inc.php';
        }

    ?>

    </div>
    </div>
</body>
</html>